class DeviceTypeList {
  bool success;
  String message;
  int code;
  Result result;
  int timestamp;

  DeviceTypeList(
      {this.success, this.message, this.code, this.result, this.timestamp});

  DeviceTypeList.fromJson(Map<String, dynamic> json) {
    success = json['success'];
    message = json['message'];
    code = json['code'];
    result =
    json['result'] != null ? new Result.fromJson(json['result']) : null;
    timestamp = json['timestamp'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['success'] = this.success;
    data['message'] = this.message;
    data['code'] = this.code;
    if (this.result != null) {
      data['result'] = this.result.toJson();
    }
    data['timestamp'] = this.timestamp;
    return data;
  }
}

class Result {
  List<Records> records;
  int total;
  int size;
  int current;
  List<Null> orders;
  bool searchCount;
  int pages;

  Result(
      {this.records,
        this.total,
        this.size,
        this.current,
        this.orders,
        this.searchCount,
        this.pages});

  Result.fromJson(Map<String, dynamic> json) {
    if (json['records'] != null) {
      records = new List<Records>();
      json['records'].forEach((v) {
        records.add(new Records.fromJson(v));
      });
    }
    total = json['total'];
    size = json['size'];
    current = json['current'];
    if (json['orders'] != null) {
      orders = new List<Null>();
      json['orders'].forEach((v) {
        //orders.add(new Null.fromJson(v));
      });
    }
    searchCount = json['searchCount'];
    pages = json['pages'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.records != null) {
      data['records'] = this.records.map((v) => v.toJson()).toList();
    }
    data['total'] = this.total;
    data['size'] = this.size;
    data['current'] = this.current;
    if (this.orders != null) {
      //data['orders'] = this.orders.map((v) => v.toJson()).toList();
    }
    data['searchCount'] = this.searchCount;
    data['pages'] = this.pages;
    return data;
  }
}

class Records {
  String typekey;
  String type;

  Records({this.typekey, this.type});

  Records.fromJson(Map<String, dynamic> json) {
    typekey = json['typekey'];
    type = json['type'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['typekey'] = this.typekey;
    data['type'] = this.type;
    return data;
  }
}